<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../tpl/head.jsp"%>
<link rel="stylesheet" href="statics/css/Money/searchfirst.css">
<link rel="stylesheet" href="statics/css/secondarytitle.css">
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-header layui-bg-cyan">
            <span>付款</span>
            <div class="titleright" id="statisticsDiv">
                <button class="layui-btn layui-btn-sm" style="margin-right:1em;" lay-filter="paymentStatistics"
                        lay-dropdown="{showBy: 'hover',align:'left', menus: [
                        {txt: '付款情况统计', event:'s1'},
                        {txt: '按出运明细统计采购应付款', event:'s2'},
                        {txt: '采购预付款统计', event:'s3'},
                        {txt: '出货金额统计', event:'s4'},
                        {txt: '采购付款统计', event:'s5'},
                        ]}">
                    <span>统计</span>
                    <i class="layui-icon layui-icon-triangle-d"></i>
                </button>
            </div>
        </div>
        <div class="layui-card-body">
            <div class="layui-row">
                <div class="layui-col-md12">
                    <div class="layui-tab layui-tab-card">
                        <form class="layui-form layui-from-pane" action="" id="editor-form" lay-filter="editor-form">
                            <div class="layui-inline">
                                <label class="layui-form-label">单据类型</label>
                                <div class="layui-input-inline">
                                    <select name="status">
                                        <option value=""></option>
                                        <option value="1">草稿箱</option>
                                        <option value="2">待批箱</option>
                                        <option value="3">已批箱</option>
                                        <option value="4">完成箱</option>
                                        <option value="5">垃圾箱</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">单据信息</label>
                                <div class="layui-input-inline">
                                    <input class="text layui-input" type="text"  name="info" id="info" autocomplete="off" placeholder="">
                                </div>
                            </div>
                            <div class="layui-inline daterange">
                                <label class="layui-form-label">付款日期</label>
                                <div class="layui-input-inline">
                                    <input type="text" class="layui-input starttime" name="startTime" placeholder="年 - 月 - 日">&nbsp;至&nbsp;<input type="text" class="layui-input starttime" name="endTime" placeholder="年 - 月 - 日">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">制单公司</label>
                                <div class="layui-input-inline">
                                    <select lay-search name="companyCode" id="companyCode">
                                        <option value=""></option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-inline daterange">
                                <label class="layui-form-label">实付日期</label>
                                <div class="layui-input-inline">
                                    <input type="text" class="layui-input starttime" name="startActualPaymentDate" placeholder="年 - 月 - 日">&nbsp;至&nbsp;<input type="text" class="layui-input starttime" name="endActualPaymentDate" placeholder="年 - 月 - 日">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">所属操作员</label>
                                <div class="layui-input-inline" style="width: 200px">
                                    <div id="operationCode" class="xm-select-demo"></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">部门操作员</label>
                                <div class="layui-input-inline" style="width: 200px">
                                    <div id="deptOperationCode" class="xm-select-demo"></div>
                                </div>
                            </div>
                            <button class="layui-btn layui-btn-sm layui-btn-submit" lay-submit="" lay-filter="submitform" style="margin-left: 10px">搜索</button>
                            <button type="reset" class="layui-btn layui-btn-sm layui-btn-submit" id="clear">重置</button>
                        </form>
                        <div id="tablediv">
                            <table class="layui-table" id="maininformation" lay-filter="maininformationtable"></table>
                        </div>
                        <div class="padding text-right">
                            <button type="button" class="layui-btn disabledbutton" id="refundregistration" disabled="disabled">退款登记</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/html" id="maininformationtoolbar">
    <a class="layui-btn layui-btn-sm layui-btn-normal" id="new" style="margin-left: 10px" lay-event="news">登记</a>
    <a class="layui-btn layui-btn-sm layui-btn-danger" id="new" style="margin-left: 10px" lay-event="print">打印</a>
</script>

<script type="text/html" id="maininformationeditor">
    {{# if(d.statusStr=='草稿箱' ||d.statusStr=='待批箱' ||d.statusStr=='已批箱'){ }}
    <a class="layui-btn layui-btn-sm layui-btn-normal" lay-event="update">修改</a>
    {{# } }}
    {{# if(d.statusStr=='草稿箱'){ }}
    <a class="layui-btn layui-btn-sm layui-btn-normal" lay-event="submits">提交审批</a>
    {{# } }}
    {{# if(d.statusStr=='待批箱'){ }}
    <a class="layui-btn layui-btn-sm layui-btn-normal" lay-event="through">审批通过</a>
    {{# } }}
    {{# if(d.statusStr=='待批箱' ||d.statusStr=='完成箱'){ }}
    <a class="layui-btn layui-btn-sm layui-btn-normal" lay-event="backtothe">审批退回</a>
    {{# } }}

    {{# if(isFinance=='是' && d.statusStr=='已批箱'){ }}
    <a class="layui-btn layui-btn-sm layui-btn-normal" lay-event="backtothe">审批退回</a>
    {{# } }}

    {{# if(d.statusStr=='已批箱'){ }}
    <a class="layui-btn layui-btn-sm layui-btn-normal" lay-event="complete">完成</a>
        {{# if(isFinance=='是' || !isFactoryFinance){ }}
        <a class="layui-btn layui-btn-sm layui-btn-normal" lay-event="arrangepayment">安排付款</a>
        {{# } }}
    {{# } }}
    {{# if(d.statusStr=='草稿箱' ||d.statusStr=='垃圾箱'){ }}
    <a class="layui-btn layui-btn-sm layui-btn-normal" lay-event="delect">删除</a>
    {{# } }}
    {{# if(d.statusStr=='垃圾箱'){ }}
    <a class="layui-btn layui-btn-sm layui-btn-normal" lay-event="reduction">还原</a>
    {{# } }}
    {{# if(d.statusStr=='草稿箱' || d.statusStr=='待批箱' || d.statusStr=='已批箱' || d.statusStr=='完成箱' || d.statusStr=='垃圾箱'){ }}
    <small>标记：</small> <div class="colorvalue" data-id = "{{d.id}}" data-index="{{d.LAY_TABLE_INDEX}}"></div>
    {{# } }}
</script>
<%@ include file="../tpl/foot.jsp"%>
<script src="statics/modules/xm-select.js"></script>
<script src="statics/js/Money/payment.js"></script>